package model

import "time"

type Reply struct {
	Id        int32     `gorm:"column:id;type:int;primaryKey;not null;" form:"id" json:"id"`
	CommentId int32     `gorm:"column:comment_id;type:int;comment:评论id;not null;" form:"comment_id" json:"comment_id"`     // 评论id
	UserId    int32     `gorm:"column:user_id;type:int;comment:回复评论用户ID;not null;" form:"user_id" json:"user_id"`          // 回复评论用户ID
	Info      string    `gorm:"column:info;type:varchar(300);comment:回复评论内容;not null;" form:"info" json:"info"`            // 回复评论内容
	LikeNum   int32     `gorm:"column:like_num;type:int;comment:获赞数量;not null;default:0;" form:"like_num" json:"like_num"` // 获赞数量
	CreatedAt time.Time `gorm:"column:created_at;type:datetime(3);not null;default:CURRENT_TIMESTAMP(3);" form:"created_at" json:"created_at"`
	UpdatedAt time.Time `gorm:"column:updated_at;type:datetime(3);not null;default:CURRENT_TIMESTAMP(3);" form:"updated_at" json:"updated_at"`
	DeletedAt time.Time `gorm:"column:deleted_at;type:datetime(3);default:NULL;" form:"deleted_at" json:"deleted_at"`
}

func (r Reply) TableName() string {
	return "reply"
}
